<%--
  Created by IntelliJ IDEA.
  User: LiuXiaoChuan
  Date: 2022/5/15
  Time: 9:09
  To change this template use File | Settings | File Templates.
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<html>
<head>
    <title>Title</title>
    <!--引入CSS文件和JS文件-->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/layui/css/layui.css"/>
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/layui/layui.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/jquery-3.5.1.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/ajaxForm.js"></script>
    <script>
        layui.use(['form', 'laydate', 'layer','jquery'], function () {
            var form = layui.form, laydate = layui.laydate, layer = layui.layer,$=layui.jquery;
            laydate.render({
                elem:'#replyTime',
                type:'date'  //指定日期选择器的类型  date 年月日  time 时分秒 dattime年月日时分秒
            });
            laydate.render({
                elem:'#feedbackTime',
                type:'date'  //指定日期选择器的类型  date 年月日  time 时分秒 dattime年月日时分秒
            });

            //监听表单的提交
            form.on('submit(formbtn)',function(){
                $("#formsbt").ajaxSubmit({
                    type:"post",
                    contentType:false,
                    url:'${pageContext.request.contextPath}/et/addenrllem',
                    success:function(data){ //添加成功的回调函数
                        var index = parent.layer.getFrameIndex(window.name); // 获得frame索引
                        parent.layer.close(index); //关闭当前frame
                        parent.layui.table.reload('titleEt'); // 可以对父窗口进行刷新
                    }
                });
            });
        });
    </script>
</head>
<body>
<form class="layui-form" id="formsbt" enctype="multipart/form-data">
    <%--    private String studName;//姓名--%>
    <div class="layui-form-item">
        <label class="layui-form-label">姓名</label>
        <div class="layui-input-inline">
            <input type="text" name="studName" id="studName"   placeholder="请输入姓名"
                   autocomplete="off" class="layui-input" lay-verify="required">
        </div>
    </div>

    <%--    private String card;//身份证--%>
    <div class="layui-form-item">
        <label class="layui-form-label" >身份证</label>
        <div class="layui-input-inline">
            <input type="text" name="card" lay-verify="required|identity" placeholder=""
                   autocomplete="off" class="layui-input">
        </div>
    </div>
    <%--    private String sex;//性别--%>
    <%--        性别--%>
    <div class="layui-form-item">
        <label class="layui-form-label">性别：</label>
        <div class="layui-input-block">
            <input type="radio" name="sex" value="男" title="男" checked />
            <input type="radio" name="sex" value="女" title="女" />
        </div>
    </div>
    <%--    private String tell;//手机号--%>
    <div class="layui-form-item">
        <label class="layui-form-label">电话：</label>
        <div class="layui-input-inline">
            <input type="tel" name="tell" lay-verify="required|phone" autocomplete="off"
                   class="layui-input">
        </div>
        <%--            <span style="font-size: 10px;color: red">※</span>--%>
    </div>
    <%--    private String qq;//QQ号码--%>
    <div class="layui-form-item">
        <label class="layui-form-label">QQ</label>
        <div class="layui-input-inline">
            <input type="text" name="qq" lay-verify="required|number"
                   autocomplete="off" class="layui-input" lay-verify="required" >
        </div>
    </div>
    <%--    private String school;//学校--%>
    <div class="layui-form-item">
        <label class="layui-form-label">学校</label>
        <div class="layui-input-inline">
            <input type="text" name="school" id="school"   placeholder="学校"
                   autocomplete="off" class="layui-input" lay-verify="required">
        </div>
    </div>
    <%--    private String classes;//班级--%>
    <div class="layui-form-item">
        <label class="layui-form-label">班级</label>
        <div class="layui-input-inline">
            <input type="text" name="classes" id="classes"   placeholder="班级"
                   autocomplete="off" class="layui-input" lay-verify="required" >
        </div>
    </div>
    <%--    private String amount;//预定报名费--%>
    <%--    private String computer;//是否送电脑(是/否)--%>
    <div class="layui-form-item">
        <label class="layui-form-label">是否送电脑(是/否)</label>
        <div class="layui-input-block">
            <input type="radio" name="computer" value="是" title="是" checked />
            <input type="radio" name="computer" value="否" title="否" />
        </div>
    </div>
    <%--    private String testTime;//试学时间--%>
    <%--    private String startTime;//入学时间--%>
    <%--    private String signdate;//录入时间--%>
    <%--    private Integer empId;//员工id关联员工表--%>
    <%--    private Integer status;//关联学生状态表--%>
    <%--    private String remark;//备注--%>
<%--    <div class="layui-form-item">--%>
<%--        <label class="layui-form-label">备注</label>--%>
<%--        <div class="layui-input-inline">--%>
<%--            <input type="text" name="remark" id="remark"   placeholder="备注"--%>
<%--                   autocomplete="off" class="layui-input" lay-verify="required">--%>
<%--        </div>--%>
<%--    </div>--%>

    <%--    private String paymentTime;//缴预定报名费时间--%>
    <%--    private String score;//入学成绩--%>
    <div class="layui-form-item">
        <label class="layui-form-label">成绩</label>
        <div class="layui-input-inline">
            <input type="text" name="score" lay-verify="required|number" placeholder="成绩"
                   autocomplete="off" class="layui-input" lay-verify="required" >
        </div>
    </div>
    <%--    private String enrollMoney;//发放金额--%>
    <%--    private String enrollMoneyTime;//发放时间--%>
    <%--    private Integer reviewStatus;//预定报名费审核--%>
    <%--    private String negativeName;//该字段用于招生老师没有账号时使用字段--%>
    <div class="layui-form-item">
        <label class="layui-form-label">招生老师</label>
        <div class="layui-input-inline">
            <input type="text" name="negativeName" id="negativeName"   placeholder="招生老师"  lay-verify="required"
                   autocomplete="off" class="layui-input" >
        </div>
    </div>
    <%--    private String reviewer;//审核人--%>
    <%--    private String reviewerTime;//审核时间--%>
        <!--private Integer studType;//班级类别,关联班级类别表-->
        <div class="layui-form-item">
            <label class="layui-form-label">班级类别:</label>
            <div class="layui-input-inline">
                <select name="studType">
                    <c:forEach items="${clist}" var="s">
                        <option value="${s.calssTypeId}">${s.classTypeName}</option>
                    </c:forEach>
                </select>
            </div>
        </div>
    <%--    private Integer majorId;//关联专业id--%>
    <div class="layui-form-item">
        <label class="layui-form-label">专业:</label>
        <div class="layui-input-inline">
            <select name="majorId">
                <c:forEach items="${mlist}" var="s">
                    <option value="${s.majorId}">${s.majorName}</option>
                </c:forEach>
            </select>
        </div>
    </div>


        <div class="layui-form-item">
            <label class="layui-form-label"></label>
            <button id="formbtn" type="button" lay-submit lay-filter="formbtn"
                    class="layui-btn layui-btn-normal layui-icon layui-icon-ok-circle">提交</button>
            <button type="reset" class="layui-btn layui-btn-primary layui-icon layui-icon-rate-half">重置</button>
        </div>

</form>
</body>
</html>
